<template>
  <div class="app-container">
    <el-button @click="clickFn">默认按钮</el-button>
    <editor  v-model="state.content" :init="state.setting" />
  </div>
</template>

<script setup name="email">
import Editor from "@tinymce/tinymce-vue";

const state = reactive({
  // editor 配置项
  content: "hello vue3-tinymce!",
  setting: {
     selector: '#tinymce',
        language_url: '/tinymce/langs/zh_CN.js', //汉化路径是自定义的，一般放在public或static里面
        language: 'zh_CN',
        skin_url: '/tinymce/skins/ui/oxide', //皮肤
        plugins: this.plugins, //插件
        //工具栏
        toolbar: this.toolbar,
        toolbar_location: '/',
        fontsize_formats: '12px 14px 16px 18px 20px 22px 24px 28px 32px 36px 48px 56px 72px', //字体大小
        font_formats: fonts.join(';'),//引入字体如['宋体=宋体','微软雅黑=微软雅黑'],
        height: 500, //高度
        placeholder: '在这里输入盖伦好帅~',
        branding: false, //隐藏右下角技术支持
  },
});

function clickFn() {
    console.log(state.content);
}
</script>
<style lang="scss"></style>
